package robo

type roboSiteTaskEnum = string

type roboSiteTaskStruct struct {
	BAG_R2_PICK    roboSiteTaskEnum
	CB_CAN_DROP    roboSiteTaskEnum
	TC_USABLE      roboSiteTaskEnum
	CB_R2_CAPPING  roboSiteTaskEnum
	CB_R2_TAKE_OFF roboSiteTaskEnum
	IN_ROBO_TASK   roboSiteTaskEnum
	TU             roboSiteTaskEnum
}

// 机械臂操作位任务枚举
var RoboSiteTaskEnum = &roboSiteTaskStruct{
	BAG_R2_PICK:    "BAG_R2_PICK",
	CB_CAN_DROP:    "CB_CAN_DROP",
	TC_USABLE:      "TC_USABLE",
	CB_R2_CAPPING:  "CB_R2_CAPPING",
	CB_R2_TAKE_OFF: "CB_R2_TAKE_OFF",
	IN_ROBO_TASK:   "IN_ROBO_TASK",
	TU:             "TU",
}

var roboSiteTaskMap = map[roboSiteTaskEnum]string{
	RoboSiteTaskEnum.BAG_R2_PICK:    "可抓袋",
	RoboSiteTaskEnum.CB_CAN_DROP:    "可放袋",
	RoboSiteTaskEnum.TC_USABLE:      "顶盖垛：可抓放盖",
	RoboSiteTaskEnum.CB_R2_CAPPING:  "笼箱：可封盖",
	RoboSiteTaskEnum.CB_R2_TAKE_OFF: "任务锁定",
	RoboSiteTaskEnum.IN_ROBO_TASK:   "暂不可用",
}

// 获取机械臂操作位任务枚举相应中文描述
func GetRoboSiteTaskDesc(code roboSiteTaskEnum) string {
	if action, ok := roboSiteTaskMap[code]; ok {
		return action
	}
	return "未知类型"
}
